gtk4.git
7 years agoUpdate Croatian translation
gogo [Mon, 16 Apr 2018 13:45:29 +0000 (13:45 +0000)]
Update Croatian translation

7 years agoci: remove allow_failure from flatpak jobs again
Christoph Reiter [Mon, 16 Apr 2018 09:54:47 +0000 (11:54 +0200)]
ci: remove allow_failure from flatpak jobs again

It was added in 814b7d7bb71920a due to too old wayland in the runtime.
5b160efc768d3 fixed it by bundling a newer wayland.

7 years agoNo need to clear GTK_MODULES anymore
Matthias Clasen [Mon, 16 Apr 2018 01:32:51 +0000 (21:32 -0400)]
No need to clear GTK_MODULES anymore

Not a variable we care about nowadays.

7 years agoSpruce up config summary
Matthias Clasen [Mon, 16 Apr 2018 01:11:57 +0000 (21:11 -0400)]
Spruce up config summary

Show all the options. Nothing to hide.

7 years agoflatpak: Bundle wayland for now
Matthias Clasen [Sun, 15 Apr 2018 21:45:45 +0000 (17:45 -0400)]
flatpak: Bundle wayland for now

We need a newer wayland than is available in the runtime
currently, so use the power of flatpak and bundle it.

7 years agotooltip: Ignore events with pressed buttons
Timm Bäder [Sun, 15 Apr 2018 15:00:32 +0000 (17:00 +0200)]
tooltip: Ignore events with pressed buttons

We dont' want to show tooltips in those cases.

7 years agogl renderer: Remove unused viewport member
Timm Bäder [Sun, 15 Apr 2018 10:58:57 +0000 (12:58 +0200)]
gl renderer: Remove unused viewport member

7 years agoframe: Use underscores in widgets ids in the docs
Timm Bäder [Sun, 15 Apr 2018 08:55:49 +0000 (10:55 +0200)]
frame: Use underscores in widgets ids in the docs

They will work in composite widget templates this way.

7 years agoframe: Remove priv pointer
Timm Bäder [Sun, 15 Apr 2018 08:55:21 +0000 (10:55 +0200)]
frame: Remove priv pointer

7 years agoframe: Stop saving label and child allocation
Timm Bäder [Sun, 15 Apr 2018 08:49:37 +0000 (10:49 +0200)]
frame: Stop saving label and child allocation

We don't use them for anything anymore.

7 years agoRemove gtk_render_icon_surface
Timm Bäder [Sat, 14 Apr 2018 20:12:51 +0000 (22:12 +0200)]
Remove gtk_render_icon_surface

As part of removing all the cairo_surace_t usage. There's still
gtk_render_icon for the same purpose that takes a GdkTexture*

7 years agowidget: Use _set_has_tooltip everywhere
Timm Bäder [Sat, 14 Apr 2018 19:52:14 +0000 (21:52 +0200)]
widget: Use _set_has_tooltip everywhere

real_set_has_tooltip sounds like it's a vfunc implementation, but it
wasn't. The force parameter was also useless so just remove that.

7 years agowidget: Use priv pointer directly
Timm Bäder [Sat, 14 Apr 2018 15:57:15 +0000 (17:57 +0200)]
widget: Use priv pointer directly

7 years agowidget: Update docs to mention ::draw less
Timm Bäder [Sat, 14 Apr 2018 15:51:11 +0000 (17:51 +0200)]
widget: Update docs to mention ::draw less

7 years agoRevert "ci: Enable the a11y test suite"
Christoph Reiter [Sun, 15 Apr 2018 03:48:02 +0000 (05:48 +0200)]
Revert "ci: Enable the a11y test suite"

This reverts commit 968a8e1cf0c5bd21e856204d3aa1f4256d7ff814.

things still fail in the gitlab runner

7 years agofont chooser: Allow tweaking fractions
Matthias Clasen [Sun, 15 Apr 2018 00:28:27 +0000 (20:28 -0400)]
font chooser: Allow tweaking fractions

This makes some sense, and frac is meant to be set globally.

7 years agoci: Enable the a11y test suite
Emmanuele Bassi [Fri, 13 Apr 2018 17:47:07 +0000 (18:47 +0100)]
ci: Enable the a11y test suite

The accessibility test suite only performs internal validation.

7 years agotests: Update the expected a11y dump results
Emmanuele Bassi [Fri, 13 Apr 2018 18:19:02 +0000 (19:19 +0100)]
tests: Update the expected a11y dump results

Keep in sync with the current tree.

The changes are mostly caused by updates in the internal hierarchy of
composite widgets, and the fact that the order in which the widget tree
is traversed is not exactly stable.

7 years agotests: Split out the accessibility dump tests
Emmanuele Bassi [Sat, 14 Apr 2018 14:59:12 +0000 (15:59 +0100)]
tests: Split out the accessibility dump tests

Instead of having a single massive test running through the a11y
directory, we can split off each individual file into its own unit.

Having individual units has several advantages:

 - units are executed in parallel
 - it's easier to identify the failing units
 - logs for failed units are easier to read

7 years agoci: Use a common section for Flatpak jobs
Emmanuele Bassi [Wed, 11 Apr 2018 16:45:29 +0000 (17:45 +0100)]
ci: Use a common section for Flatpak jobs

Avoid repeating blobs of YAML manually, and use the proper YAML
mechanism to copy-paste blobs instead.

7 years agoGskRenderer: Plug a memory leak
Timm Bäder [Sat, 14 Apr 2018 10:37:19 +0000 (12:37 +0200)]
GskRenderer: Plug a memory leak

7 years agoflowbox: Remove unnecessary queue_draw call
Timm Bäder [Sat, 14 Apr 2018 10:05:55 +0000 (12:05 +0200)]
flowbox: Remove unnecessary queue_draw call

7 years agopaned: Remove outdated comment
Timm Bäder [Sat, 14 Apr 2018 09:49:57 +0000 (11:49 +0200)]
paned: Remove outdated comment

The cursor is not updated in state_flags_changed these days.

7 years agobuild: Print summary last
Timm Bäder [Fri, 13 Apr 2018 13:21:41 +0000 (15:21 +0200)]
build: Print summary last

7 years agogl renderer: Don't use texture ids in glBindFramebuffer calls
Timm Bäder [Thu, 12 Apr 2018 09:02:46 +0000 (11:02 +0200)]
gl renderer: Don't use texture ids in glBindFramebuffer calls

7 years agosnapshot: don't create offset nodes inside offset nodes
Timm Bäder [Thu, 12 Apr 2018 08:06:16 +0000 (10:06 +0200)]
snapshot: don't create offset nodes inside offset nodes

It's pretty easy to make that one offset node.

7 years agogl renderer: Increase GArray size by 2 up front
Timm Bäder [Thu, 12 Apr 2018 07:47:17 +0000 (09:47 +0200)]
gl renderer: Increase GArray size by 2 up front

Since we know we will add two elements anyway.

7 years agowidget: Avoid a dead assignment
Timm Bäder [Thu, 12 Apr 2018 06:20:43 +0000 (08:20 +0200)]
widget: Avoid a dead assignment

7 years agotooltip: Avoid some possibly uninitialized values
Timm Bäder [Thu, 12 Apr 2018 06:20:28 +0000 (08:20 +0200)]
tooltip: Avoid some possibly uninitialized values

7 years agopo: fix zh_CN translation
Aron Xu [Sat, 14 Apr 2018 05:10:27 +0000 (13:10 +0800)]
po: fix zh_CN translation

7 years agowayland: Don't freeze the frame clock too early
Benjamin Otte [Fri, 13 Apr 2018 00:13:27 +0000 (02:13 +0200)]
wayland: Don't freeze the frame clock too early

We can't freeze the frame clock on commit, but only after-paint,
otherwise the frameclock will resume in the paint stage.

So freeze the frame clock at the end of the frame if we are waiting for
a frame callback.

Note; The diff is only lage because of indentation changes due to
avoiding early returns in favor of a branch.

7 years agogdk: Remove gdk_surface_create_similar_image_surface()
Benjamin Otte [Wed, 11 Apr 2018 23:42:21 +0000 (01:42 +0200)]
gdk: Remove gdk_surface_create_similar_image_surface()

It's unused.

7 years agogdk: Remove gdk_cairo_surface_create_from_pixbuf()
Benjamin Otte [Wed, 11 Apr 2018 23:41:51 +0000 (01:41 +0200)]
gdk: Remove gdk_cairo_surface_create_from_pixbuf()

It's unused and people should use textures and snapshots anyway.

7 years agowidget-factory: Use a pixbuf instead of a surface
Benjamin Otte [Wed, 11 Apr 2018 23:40:38 +0000 (01:40 +0200)]
widget-factory: Use a pixbuf instead of a surface

This gets rid of the last user of
gdk_cairo_surface_create_from_pixbuf().

7 years agotestgtk: Don't set cairo surfaces as icons
Benjamin Otte [Wed, 11 Apr 2018 23:29:15 +0000 (01:29 +0200)]
testgtk: Don't set cairo surfaces as icons

The code expects textures these days, so use those.

7 years agogdk: Remove gdk_cairo_get_drawing_context()
Benjamin Otte [Wed, 11 Apr 2018 23:02:33 +0000 (01:02 +0200)]
gdk: Remove gdk_cairo_get_drawing_context()

It's unused.

7 years agotests: Use gdk_texture_save_to_png() where appropriate
Benjamin Otte [Thu, 12 Apr 2018 11:59:55 +0000 (13:59 +0200)]
tests: Use gdk_texture_save_to_png() where appropriate

7 years agotexture: Add gdk_texture_save_to_png()
Benjamin Otte [Thu, 12 Apr 2018 11:50:33 +0000 (13:50 +0200)]
texture: Add gdk_texture_save_to_png()

It's needed for debugging Timm's code, so better have it here than
hidden in my random-patch vault.

7 years agodrawingcontext: Remove unused APIs
Benjamin Otte [Wed, 11 Apr 2018 17:20:17 +0000 (19:20 +0200)]
drawingcontext: Remove unused APIs

7 years agoci: allow flatpak jobs to fail for now
Christoph Reiter [Wed, 11 Apr 2018 17:49:03 +0000 (19:49 +0200)]
ci: allow flatpak jobs to fail for now

We can easily revert this when things are fixed again.

7 years agoscrolledwindow: Fix indicator revealing
Timm Bäder [Wed, 11 Apr 2018 17:14:09 +0000 (19:14 +0200)]
scrolledwindow: Fix indicator revealing

We need to increase the scrollbar bounds size.

7 years agogl renderer: Slightly change ops_offset behavior
Timm Bäder [Wed, 11 Apr 2018 16:09:30 +0000 (18:09 +0200)]
gl renderer: Slightly change ops_offset behavior

Add the given delta to the current one instead of replacing it.

7 years agogl renderer: Don't draw all rounded clip nodes to a texture
Timm Bäder [Wed, 11 Apr 2018 15:57:57 +0000 (17:57 +0200)]
gl renderer: Don't draw all rounded clip nodes to a texture

We only need to do that if the rounde clip node intersects with the
outer one.

7 years agoGDK W32: Fix a missing weak referencing
Руслан Ижбулатов [Wed, 11 Apr 2018 16:39:34 +0000 (16:39 +0000)]
GDK W32: Fix a missing weak referencing

The changes in a82d67bb7d9290693e8d8c503e65694bb62b44ca didn't
preserve a g_object_weak_ref() call that we need to ensure the
objects in hash map don't become stale. Fix this.

7 years agoMerge branch 'gitlab-ci-ccache-again' into 'master'
Emmanuele Bassi [Wed, 11 Apr 2018 14:32:37 +0000 (14:32 +0000)]
Merge branch 'gitlab-ci-ccache-again' into 'master'

gitlab-ci: Reenable ccache but disable it during the initial meson call

See merge request GNOME/gtk!111

7 years agoSimplify the Wayland code generation
Emmanuele Bassi [Wed, 11 Apr 2018 13:37:57 +0000 (14:37 +0100)]
Simplify the Wayland code generation

Instead of going through an ancillary script to strip away the
`WL_EXPORT` annotation from the generated code, we should bump up the
required version of Wayland, and use the `private-code` argument for
wayland-scanner, which does the right thing for us.

7 years agogitlab-ci: Reenable ccache but disable it during the initial meson call
Christoph Reiter [Wed, 11 Apr 2018 10:18:55 +0000 (12:18 +0200)]
gitlab-ci: Reenable ccache but disable it during the initial meson call

There where some problems (??) with ccache not detecting changes during meson
checks. Setting CCACHE_DISABLE during the meson execution makes ccache not use
the cache and pass things directly to the compiler.

7 years agogl renderer: Render everyhing according to MV scale
Timm Bäder [Wed, 11 Apr 2018 09:20:50 +0000 (11:20 +0200)]
gl renderer: Render everyhing according to MV scale

And not the surface's scale factor. This way the magnifier works.

7 years agogl renderer: Remove unused field
Timm Bäder [Wed, 11 Apr 2018 08:10:38 +0000 (10:10 +0200)]
gl renderer: Remove unused field

7 years agoci: Update container to Fedora 28
Emmanuele Bassi [Wed, 11 Apr 2018 12:58:47 +0000 (13:58 +0100)]
ci: Update container to Fedora 28

We're going to need updated dependencies that we cannot build as
subprojects, like wayland-protocols.

7 years agowidget: Not all toplevels are containers
Benjamin Otte [Wed, 11 Apr 2018 02:04:37 +0000 (04:04 +0200)]
widget: Not all toplevels are containers

Guard against GtkInvisible.

7 years agowidget: Only start/stop idle sizers for toplevels
Benjamin Otte [Wed, 11 Apr 2018 01:08:55 +0000 (03:08 +0200)]
widget: Only start/stop idle sizers for toplevels

They are the only widgets that have idle sizers.

7 years agowidget: Move frame clock handling to vfunc
Benjamin Otte [Wed, 11 Apr 2018 01:03:35 +0000 (03:03 +0200)]
widget: Move frame clock handling to vfunc

Instead of connecting to / disconnecting from the frame clock, do it
inside the vfuncs next to changing the priv->realized boolean.

This removes a race between those 2 cases that could cause child
widgets' unrealize handlers to reconnect this widget to the frame clock
because it was still marked as realize when the widget had already
disconnected from the frame clock.

Fixes #168

7 years agowidget: Remove gtk_widget_set_realized()
Benjamin Otte [Wed, 11 Apr 2018 00:48:43 +0000 (02:48 +0200)]
widget: Remove gtk_widget_set_realized()

Everybody chains up now.

7 years agogtk: Chain up in toplevels' realize
Benjamin Otte [Wed, 11 Apr 2018 00:43:19 +0000 (02:43 +0200)]
gtk: Chain up in toplevels' realize

Don't call set_realized() manually.

7 years agowidget: Make gtk_widget_real_realize() stricter
Benjamin Otte [Wed, 11 Apr 2018 00:38:00 +0000 (02:38 +0200)]
widget: Make gtk_widget_real_realize() stricter

But in turn, also allow it to work on widgets with their own surface.

This way, we can chain up from everywhere and won't have to export
gtk_widget_set_realized().

7 years agowidget: Assert unrealizing
Benjamin Otte [Wed, 11 Apr 2018 00:33:23 +0000 (02:33 +0200)]
widget: Assert unrealizing

Instead of just setting the flag, assert that it was set.

7 years agowidget: Remove unused member
Benjamin Otte [Tue, 10 Apr 2018 22:08:33 +0000 (00:08 +0200)]
widget: Remove unused member

7 years agocontainer: Remove gtk_container_maybe_start_idle_sizer()
Benjamin Otte [Tue, 10 Apr 2018 20:20:10 +0000 (22:20 +0200)]
container: Remove gtk_container_maybe_start_idle_sizer()

Fold it into gtk_container_start_idle_sizer()

7 years agocontainer: Remove gtk_container_queue_resize_handler()
Benjamin Otte [Tue, 10 Apr 2018 20:08:10 +0000 (22:08 +0200)]
container: Remove gtk_container_queue_resize_handler()

It's the same as gtk_container_maybe_start_idle_sizer()

7 years agocontainer: Use maybe_start_idle_sizer()
Benjamin Otte [Tue, 10 Apr 2018 20:07:36 +0000 (22:07 +0200)]
container: Use maybe_start_idle_sizer()

That way, we don't accidentally start an idle sizer for unrealized
widgets.

7 years agowindow: Don't queue resize handler
Benjamin Otte [Tue, 10 Apr 2018 20:02:31 +0000 (22:02 +0200)]
window: Don't queue resize handler

It's not needed, because the queue_allocate() call right above it does
this work.

7 years agowidget: Don't queue resize handler twice
Benjamin Otte [Tue, 10 Apr 2018 20:01:18 +0000 (22:01 +0200)]
widget: Don't queue resize handler twice

We already queue it when we set_alloc_needed(), so there's no need to do
it again.

7 years agocontainer: Don't store the resize clock
Benjamin Otte [Tue, 10 Apr 2018 19:45:09 +0000 (21:45 +0200)]
container: Don't store the resize clock

Use gtk_widget_get_frame_clock() instead

7 years agoMerge branch 'gitlab-ci-mingw' into 'master'
Benjamin Otte [Tue, 10 Apr 2018 18:59:49 +0000 (18:59 +0000)]
Merge branch 'gitlab-ci-mingw' into 'master'

gitlab-ci: mingw build

See merge request GNOME/gtk!105

7 years agogitlab-ci: Add a 32bit mingw build
Christoph Reiter [Fri, 6 Apr 2018 16:15:38 +0000 (18:15 +0200)]
gitlab-ci: Add a 32bit mingw build

7 years agoTerminate strncpy() buffers correctly
Emmanuele Bassi [Tue, 10 Apr 2018 13:51:27 +0000 (14:51 +0100)]
Terminate strncpy() buffers correctly

When using strncpy() with a buffer we need to account for the
terminating NUL character. GCC 8 started warning when using PPD_MAX_NAME
as the buffer length for strncpy() because the buffer we're copying into
has the same length — which means that the terminating NUL may be
skipped if the source string has a length of PPD_MAX_NAME.

The appropriate way to handle the case where we're copying a source with
a length bigger than of PPD_MAX_NAME is, as reported in the strncpy()
documentation, to copy `PPD_MAX_NAME - 1` bytes, and explicitly NUL
terminate the destination buffer. This has the additional benefit of
avoiding the compiler warning.

7 years agowayland: Factor out frame timings request code
Benjamin Otte [Tue, 10 Apr 2018 13:10:56 +0000 (15:10 +0200)]
wayland: Factor out frame timings request code

Also call the code everywhere we draw and not just with Cairo.

7 years agofilechooserbutton: Fix reserved pointers
Benjamin Otte [Tue, 10 Apr 2018 12:22:16 +0000 (14:22 +0200)]
filechooserbutton: Fix reserved pointers

So gcc stops complaining about unnecessary parenthesis.

7 years agoffmpeg: Fix compile warnings for newest version
Benjamin Otte [Tue, 10 Apr 2018 12:21:50 +0000 (14:21 +0200)]
ffmpeg: Fix compile warnings for newest version

7 years agovulkancontext: Add new error enum
Timm Bäder [Tue, 10 Apr 2018 07:53:48 +0000 (09:53 +0200)]
vulkancontext: Add new error enum

7 years agowidgetfocus: Use gtk_widget_compute_bounds
Timm Bäder [Sun, 8 Apr 2018 09:35:39 +0000 (11:35 +0200)]
widgetfocus: Use gtk_widget_compute_bounds

Instead of gtk_widget_get_allocation.

7 years agowidget: Remove _get_own_allocation
Timm Bäder [Sat, 7 Apr 2018 11:37:24 +0000 (13:37 +0200)]
widget: Remove _get_own_allocation

Replace all usages of it with _compute_bounds

7 years agowidget: Remove gtk_widget_get_own_allocation
Timm Bäder [Sat, 7 Apr 2018 08:13:36 +0000 (10:13 +0200)]
widget: Remove gtk_widget_get_own_allocation

Use compute_bounds everywhere.

7 years agowidget: Remove get_own_allocation usages
Timm Bäder [Sat, 7 Apr 2018 08:10:57 +0000 (10:10 +0200)]
widget: Remove get_own_allocation usages

7 years agonotebook: Use compute_bounds
Timm Bäder [Sat, 7 Apr 2018 08:02:02 +0000 (10:02 +0200)]
notebook: Use compute_bounds

7 years agopopover: Use gtk_widget_compute_bounds
Timm Bäder [Sat, 7 Apr 2018 07:29:17 +0000 (09:29 +0200)]
popover: Use gtk_widget_compute_bounds

Instead of the private get_own_allocation

7 years agotoolbar: Avoid a get_own_allocation call
Timm Bäder [Sat, 7 Apr 2018 07:26:31 +0000 (09:26 +0200)]
toolbar: Avoid a get_own_allocation call

We want the content allocation here since we are allocation child
widgets.

7 years agowidget: Fix typo in compute_bounds docs
Timm Bäder [Sat, 7 Apr 2018 07:26:12 +0000 (09:26 +0200)]
widget: Fix typo in compute_bounds docs

7 years agogdk: Protect against negative GDK_SCALE values
Timm Bäder [Sat, 7 Apr 2018 08:05:38 +0000 (10:05 +0200)]
gdk: Protect against negative GDK_SCALE values

Using those should not happen.

7 years agoGDK W32: use clock after_paint signal for timing updates
Руслан Ижбулатов [Mon, 9 Apr 2018 20:16:23 +0000 (20:16 +0000)]
GDK W32: use clock after_paint signal for timing updates

* Previous commit had misleading info. The code was
added to begin_paint() instead of end_paint(). Though
that did not affect its performance in any visible way.
* Company advised to move the code to an "after_paint" signal
handler, so that it works on all renderers, not just Cairo.
This change caused high fluctuation in FPS values in fishbowl
when it is put in a situation where it cannot achieve 60fps
(such as using Cairo renderer at ultra-high resolution).
This seems to be deliberate and not a bug.

7 years agodocs: Link to GResource
Emmanuele Bassi [Mon, 9 Apr 2018 19:10:47 +0000 (20:10 +0100)]
docs: Link to GResource

Since we're referring to GLib's functionality, might as well save some
time to the reader, and link to the GResource API reference page.

7 years agodocs/reference/gtk/getting_started: cgit => GitLab
Daniel Boles [Mon, 9 Apr 2018 19:55:14 +0000 (20:55 +0100)]
docs/reference/gtk/getting_started: cgit => GitLab

master version of b685eb177932c021975a4b337e37d5911c537de0

7 years agoGDK W32: set update frequency and timestamp
Руслан Ижбулатов [Mon, 9 Apr 2018 19:07:10 +0000 (19:07 +0000)]
GDK W32: set update frequency and timestamp

There is no easily apparent way of being notified when frame updates
happene exactly, so we just query frame info at the end of each paint.
If we query too often (faster than DWM refresh rate), we just get
the same values twice in a row, but that is, hopefully, highly unlikely.

7 years agoAccelGroup: Remove @See_also of deleted function
Daniel Boles [Mon, 9 Apr 2018 18:43:45 +0000 (19:43 +0100)]
AccelGroup: Remove @See_also of deleted function

gtk_item_factory_new() is not a thing that exists.

Also, maybe the lack of space after the colon was what stopped the link
from rendering.

7 years agocss: Clipping changes don't need a queue_allocate() anymore
Benjamin Otte [Mon, 9 Apr 2018 18:19:17 +0000 (20:19 +0200)]
css: Clipping changes don't need a queue_allocate() anymore

Now that queue_draw() isn't restricted to clip anymore, we don't need to
care about clip in the CSS engine either.

We do keep GTK_CSS_AFFECTS_CLIP around though because GtkWindow does
care for the window's size.

7 years agoentry: Stop being activatable
Benjamin Otte [Mon, 9 Apr 2018 12:45:04 +0000 (14:45 +0200)]
entry: Stop being activatable

Activating entries does not do anything.

Activate the default widget instead.

7 years agoMerge branch 'master' into 'master'
Daniel Boles [Mon, 9 Apr 2018 17:25:08 +0000 (17:25 +0000)]
Merge branch 'master' into 'master'

gdk_x11_display_get_monitor: fix monitor number test logic

See merge request GNOME/gtk!107

7 years agogdk_x11_display_get_monitor: fix monitor number test logic
Sébastien Villemot [Mon, 9 Apr 2018 13:36:36 +0000 (15:36 +0200)]
gdk_x11_display_get_monitor: fix monitor number test logic

When asked for a nonexistent (positive) monitor number,
gdk_x11_display_get_monitor would (at best) return an uninitialized pointer,
instead of returning NULL.

8 years agoglcontext: Store the buffer age regions in the GL context
Benjamin Otte [Sun, 8 Apr 2018 22:58:31 +0000 (00:58 +0200)]
glcontext: Store the buffer age regions in the GL context

That way, we can store the right region there: The actual painted area
instead of the exposed area (which is way too small).

Also, the GL context is the only user of this data, so storing it there
seems way smarter.

8 years agovulkan: Use new resize vfunc to recreate swapchain
Benjamin Otte [Sun, 8 Apr 2018 22:40:47 +0000 (00:40 +0200)]
vulkan: Use new resize vfunc to recreate swapchain

... instead of checking sizes for every frame.

8 years agodrawcontext: Add a surface_resized() vfunc
Benjamin Otte [Sun, 8 Apr 2018 22:35:32 +0000 (00:35 +0200)]
drawcontext: Add a surface_resized() vfunc

Call this vfunc whenever the surface's size has changed.

8 years agosurface: Track all draw contexts created for the surface
Benjamin Otte [Sun, 8 Apr 2018 22:25:03 +0000 (00:25 +0200)]
surface: Track all draw contexts created for the surface

8 years agowidget: Don't do a 0-size check before snapshotting
Benjamin Otte [Sun, 8 Apr 2018 18:09:45 +0000 (20:09 +0200)]
widget: Don't do a 0-size check before snapshotting

Even widgets with an empty allocation may still want to draw stuff.
Examples include shadows or child widgets with negative margins.

Fixes GtkEntry's progressbar not showing up anymore.

8 years agotestmodelbutton: Test :centered, :icon, :inverted
Daniel Boles [Sun, 8 Apr 2018 17:39:59 +0000 (18:39 +0100)]
testmodelbutton: Test :centered, :icon, :inverted

Test more stuff.

8 years agotestmodelbutton: Fix wrongly overridding MB child
Daniel Boles [Sun, 8 Apr 2018 17:31:03 +0000 (18:31 +0100)]
testmodelbutton: Fix wrongly overridding MB child

I was setting a GtkButton:label, which resulted in the ModelButton's own
custom children getting lost. That doesn't make for a useful test...

8 years agoModelButton: Use WARN_INVALID_PROPERTY, not assert
Daniel Boles [Sun, 8 Apr 2018 17:13:33 +0000 (18:13 +0100)]
ModelButton: Use WARN_INVALID_PROPERTY, not assert

Do the same thing we do everywhere else for invalid properties.

8 years agoModelButton: Fix type Wether => Whether
Daniel Boles [Sun, 8 Apr 2018 16:08:11 +0000 (17:08 +0100)]
ModelButton: Fix type Wether => Whether

8 years agotestmodelbutton: Add explanatory comments to CSS
Daniel Boles [Sun, 8 Apr 2018 15:07:35 +0000 (16:07 +0100)]
testmodelbutton: Add explanatory comments to CSS

and load at an earlier, more sensible place, before creating any widgets

8 years agoModelButton: Protect against nonsensical gbooleans
Daniel Boles [Sun, 8 Apr 2018 11:43:07 +0000 (12:43 +0100)]
ModelButton: Protect against nonsensical gbooleans

the same way we do normally.